package com.huiminpay.transaction.api.service;

import com.huiminpay.common.cache.domain.BusinessException;
import com.huiminpay.paymentagent.api.dto.PaymentResponseDTO;
import com.huiminpay.transaction.api.dto.PayOrderDTO;
import com.huiminpay.transaction.api.dto.QRCodeDto;

public interface TransactionService {
    /**
	\* 生成门店二维码
	\* @param qrCodeDto，传入merchantId,appId、storeid、channel、subject、body
	\* @return 支付入口URL，将二维码的参数组成json并用base64编码
	\* @throws BusinessException
	*/
    String createStoreQRCode(QRCodeDto qrCodeDto) throws BusinessException;

	/**
	 * 调代理服务对应支付宝
	 * @param payOrderDTO 订单信息
	 * @return   支付宝响应数据表单
	 * @throws BusinessException
	 */
	PaymentResponseDTO<String> submitOrderByApli(PayOrderDTO payOrderDTO) throws BusinessException;

	/**
	 * 更新订单号
	 * @param tradeNo  订单号
	 * @param payChannelTradeNo 支付渠道交易流水号
	 * @param tradeState 交易状态
	 * @throws BusinessException
	 */
	void updatePayOrder(String tradeNo,String payChannelTradeNo,String tradeState) throws BusinessException;
}